package com.littcore.saap.assistant.service;

import java.util.List;
import java.util.Map;

import com.littcore.saap.assistant.po.UserPortlet;
import com.littcore.saap.assistant.vo.UserPortletVo;

/**
 * .
 * 
 * <pre><b>描述：</b>
 *    
 * </pre>
 * 
 * <pre><b>修改记录：</b>
 *    
 * </pre>
 * 
 * @author <a href="mailto:littcai@hotmail.com">蔡源</a>
 * @since 2015年10月21日
 * @version 1.0
 */
public interface IUserPortletService {

  /**
   * Save.
   *
   * @param portletUid the portlet uid
   * @param userId the user id
   * @param name the name
   * @param refreshInterval the refresh interval
   * @param positionX the position x
   * @param positionY the position y
   * @param params the params
   */
  public void save(String portletUid, int userId, String name, int refreshInterval, int positionX, int positionY, Map<String, Object> params);

  /**
   * Update.
   * @param userPortlet UserPortlet
   */
  public void update(UserPortlet userPortlet);
  
  public void updateName(Integer id, String name);

  public void delete(Integer id);

  /**
   * Delete by instance.
   * @param id id
   */
  public void delete(UserPortlet userPortlet);

  public UserPortlet load(Integer id);

  public List<UserPortlet> listByUser(int userId);
  
  public List<UserPortletVo> findByUser(int userId);

}